<?xml version="1.0" encoding="UTF-8"?>
<ui:composition
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
	xmlns:f="http://xmlns.jcp.org/jsf/core"
	xmlns:h="http://xmlns.jcp.org/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">

	<ui:define name="head">
		h2{
			text-align:center
		}
		.rowStyle{
			text-align: center;
			font-size:16px
		}
	</ui:define>
	<p:panel
		id="bulletinReqs"
		header="公告要求">
		<h:panelGrid
			columns="2"
			cellpadding="5"
			columnClasses="column1,column2">
			<p:outputLabel
				for="rootQualificationGroup"
				value="匹配规则" />
			<h:outputText
				id="rootQualificationGroup"
				style="font-size:16px;color:red"
				value="#{bulletinHome3.instance.qualificationGroup.relation.typeName}" />
		</h:panelGrid>
		<p:panel
			id="agentServiceReqs"
			header="服务事项要求"
			rendered="#{bulletinHome3.instance.qualificationGroup.getAgentServiceGroups().size() > 0}"
			style="margin-bottom:10px;">
			<p:repeat
				var="_serviceGroup"
				value="#{bulletinHome3.instance.qualificationGroup.getAgentServiceGroups()}"
				varStatus="_groupStatus">
				<p:panelGrid
					cellpadding="5"
					style=" margin-bottom: 10px;width:100%">
					<p:row style="width:100%">
						<p:column>
							<h2>服务事项要求组#{_groupStatus.index +
								1}（#{_serviceGroup.relation.typeName}组）</h2>
						</p:column>
					</p:row>

					<p:row>
						<p:column>
							<p:panelGrid
								cellpadding="5"
								style="width:100%">
								<p:row styleClass="rowStyle">
									<p:column>服务事项名称</p:column>
									<p:column>对应资质大类</p:column>
								</p:row>

								<p:repeat
									var="_service"
									value="#{_serviceGroup.agentServices}">
									<p:row>
										<p:column>
											<h:outputText value="#{_service.name}" />
										</p:column>
										<p:column>
											<h:outputText value="#{_service.qualificationClass.name}" />
										</p:column>
									</p:row>
								</p:repeat>
							</p:panelGrid>
						</p:column>
					</p:row>
				</p:panelGrid>
			</p:repeat>
		</p:panel>
		
		<p:panel
			id="reqs"
			header="资质要求"
			rendered="#{bulletinHome3.instance.qualificationGroup.getQualificationGroups().size () > 0}"
			style="margin-bottom:10px;">
			<h:outputText
				value="#{bulletinHome3.instance.qualificationGroup.getQualificationGroupDetail()}" />
		</p:panel>
		<p:panel
			id="defs"
			header="中介报名上传附件要求"
			rendered="#{bulletinHome3.instance.defs.size () > 0}"
			style="margin-bottom:10px;">
			<p:panelGrid
				cellpadding="5"
				style="width:100%">
				<p:repeat
					var="_def"
					value="#{bulletinHome3.instance.defs}">
					<p:row>
						<p:column>
							<h:outputText value="#{_def.requiredName}" />
							<span style="color: red">(#{_def.required ? '必填' : '非必填'})</span>
						</p:column>
					</p:row>
				</p:repeat>
			</p:panelGrid>

		</p:panel>
	</p:panel>

</ui:composition>